package com.zhiyin.seal.service;

import com.zhiyin.seal.entity.bo.ApplyAttachmentBo;
import com.zhiyin.seal.entity.bo.ApplyBo;
import com.zhiyin.seal.entity.bo.ApplyDetailBo;
import com.zhiyin.seal.entity.bo.ImageBo;
import org.springframework.core.io.FileSystemResource;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 文件服务
 */
public interface FileService {

    String uploadImage(ImageBo imageBo, MultipartFile file);

    Boolean uploadAttachment(ApplyAttachmentBo attachmentBo, MultipartFile file);

    FileSystemResource downloadImage(String imageName);

    FileSystemResource downloadPdf(String fileName,Long companyId,Integer type);

    FileSystemResource downloadAttachment(String fileName);

    ApplyAttachmentBo getAttachmentByFileName(String fileName);

    List<ApplyAttachmentBo> getAttachmentListByApplyId(Long applyId);

    Boolean updateAttachmentApplyId(Long applyId,List<String> fileUrls);

    void exportFile(Integer exportType, List<ApplyBo> applyBoList, HttpServletResponse response);

    void exportApply(ApplyDetailBo applyDetailBo, HttpServletResponse response);
}
